<template>
	<div>
		<textarea class="my_editor" id="notes_to_buy" v-model="Editor_notes_to_buy"></textarea>
	</div>
</template>

<script>
	export default {
		props: ["id"],
		data() {
			return {
				Editor_notes_to_buy:''
			}
		},
		components: {},
		created() {},
		mounted() {
			this.tinymce();
		},
		methods: {
			tinymce() {
				let _this = this;
				_this.$tinymce.baseURL = '/static/tinymce'
				_this.$tinymce.init({
					selector: '#notes_to_buy',
					language_url: '../../../../static/tinymce/zh_CN.js',
					language: 'zh_CN',
					init_instance_callback: function(editor) {
						editor.on('keyup', () => {
							_this.Editor_notes_to_buy = editor.getContent();
						});
					}
				});
			}
		},

	}
</script>

<style>
	.tox-menubar {
		display: none !important;
	}

	.tox .tox-statusbar {
		border-top: 0 !important;
	}

	.tox-statusbar__branding,
	.tox .tox-statusbar__path>* {
		display: none !important;
	}
</style>
